home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr49
/
cpu100.zip
/
TEST.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-04-14
|
1KB
|
52 lines
#include <conio.h>
#include <stdlib.h>
#include <dos.h>
#include <process.h>
#include "cpu.h"
#define ROUND 1
void main(void)
{
static char *CPUS[]={
"Undetermined",
"8086/8088",
"8086/8088 with Coprocessor",
"80286",
"80286 with Coprocessor",
"i386tm",
"i386tm with 387 Coprocessor",
"i386tm with 87/287 Coprocessor",
"i486tm (SX)",
"i486tm (DX) or i487tm (SX) with Coprocessor",
NULL
};
static char *Protect[]={
"not in Protected",
"in Protected",
"in Protected mode via MS-Windows Enhanced",
NULL
};
static char *Windows[]={
"DOS",
"Windows/386 2.x",
"Windows 3.x in Enhanced mode",
"Windows 4.x in Enhanced mode",
"Windows/386 2.x",
"Windows 3.0 in Real mode or Windows 3.1+ in Standard mode",
"Windows 3.0 in Standard mode",
NULL
};
int cputype,pmode,win;
clrscr();
cputype=cpu();
win=iswin();
pmode=isprot();
cprintf("This machine has a %s.\n\rTesting processor speed...",CPUS[cputype]);
cprintf("\rIt has a processing speed of %s MHz.\n\r",cpuspeed(ROUND,cputype));
cprintf("The CPU is currently %s mode and is\n\rrunning under %s.\n\r",Protect[pmode],Windows[win]);
exit(0);
}